home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -in_the_mag- / emulation / amiga / uae-0.7.0b2 / src / ggi.c < prev    next >
C/C++ Source or Header  |  1998-01-20  |  15KB  |  645 lines

  1.  /*
  2.   * UAE - The Un*x Amiga Emulator
  3.   *
  4.   * GGI - Interface
  5.   *
  6.   * Always remember: "GGI - The right thing to do[tm]"
  7.   *
  8.   * Copyright 1997 Christian Schmitt <schmitt@freiburg.linux.de>,
  9.   *                Stefan Reinauer <stepan@freiburg.linux.de>
  10.   */
  11.  
  12. #include "sysconfig.h"
  13. #include "sysdeps.h"
  14.  
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <time.h>
  18. #include <unistd.h>
  19. #include <ggi/libggi.h>
  20. #include <string.h>
  21.  
  22. #include "config.h"
  23. #include "options.h"
  24. #include "threaddep/penguin.h"
  25. #include "uae.h"
  26. #include "memory.h"
  27. #include "custom.h"
  28. #include "readcpu.h"
  29. #include "newcpu.h"
  30. #include "keyboard.h"
  31. #include "xwin.h"
  32. #include "keybuf.h"
  33. #include "gui.h"
  34. #include "picasso96.h"
  35.  
  36. static ggi_visual_t vis;
  37. static ggi_graphtype amiga_modetype;
  38. static unsigned char pack[256];
  39. static uae_u8 dither_buf[1000];
  40. int buttonstate[3] = {0, 0, 0};
  41. int lastmx,lastmy,newmousecounters=0;
  42. static int keystate[256];
  43.  
  44. int need_dither,bpp;
  45. void *linear=NULL;
  46.  
  47. static int screen_is_picasso;
  48. static char picasso_invalid_lines[1200];
  49. static ggi_graphtype picasso_modetype;
  50.  
  51. struct bstring *video_mode_menu = NULL;
  52.  
  53. /* We don't need a brkhandler with GGI */
  54. void setup_brkhandler(void)
  55. {
  56. }
  57.  
  58. #define MAX_SCREEN_MODES 6
  59. #define MAX_GGI_COLOR_MODES 4
  60.  
  61. int x_size_table[MAX_SCREEN_MODES]={320,640,640,800,1024,1152};
  62. int y_size_table[MAX_SCREEN_MODES]={200,400,480,600,768,864};
  63. ggi_graphtype color_table[MAX_GGI_COLOR_MODES]=
  64.   {GT_4BIT,GT_8BIT,GT_16BIT,GT_32BIT};
  65.  
  66. static struct ggi_graphmodes{
  67.   int x;
  68.   int y;
  69.   int col;
  70.   struct ggi_graphmodes *next;
  71. } got_modes;
  72.  
  73.  
  74. int graphics_setup(void)
  75. {
  76.     struct ggi_graphmodes *dummy;
  77.     int count=0;
  78.     char buf[80];
  79.     int i,j,c;
  80.  
  81.     ggiInit();
  82.  
  83.     if((vis=ggiOpen(NULL))==NULL) {
  84.     fprintf(stderr,"Can't open Visual\n");
  85.     return 0;
  86.     }
  87.  
  88.     for(i=0;i<MAX_SCREEN_MODES;i++) {
  89.     for(j=0;j<MAX_GGI_COLOR_MODES;j++) {
  90.         if (ggiCheckGraphMode(vis, x_size_table[i], y_size_table[i],
  91.                   x_size_table[i], y_size_table[i],
  92.                   color_table[j]) != 0)
  93.           continue;
  94.  
  95.         dummy=(struct ggi_graphmodes *)malloc(sizeof(struct ggi_graphmodes));
  96.         dummy->x=x_size_table[i];
  97.         dummy->y=y_size_table[i];
  98.         switch(color_table[j]) {
  99.          case GT_4BIT  : c=4;break;
  100.          case GT_8BIT  : c=8;break;
  101.          case GT_16BIT : c=16;break;
  102.          case GT_32BIT : c=32;break;
  103.          default       : break; /* Ups */
  104.         }
  105.         dummy->col=c;
  106.         dummy->next=got_modes.next;
  107.         got_modes.next=dummy;
  108.         count++;
  109.     }
  110.     }
  111.     count++;
  112.     video_mode_menu = (struct bstring *)malloc(sizeof (struct bstring)*count);
  113.     memset(video_mode_menu, 0, sizeof (struct bstring)*count);
  114.     dummy=got_modes.next;
  115.     for (i = 0; i < count - 1; i++) {
  116.     sprintf(buf, "%3dx%d, %2d Bit", dummy->x, dummy->y,dummy->col);
  117.     video_mode_menu[i].val = -1;
  118.     video_mode_menu[i].data = strdup(buf);
  119.     dummy = dummy->next;
  120.     }
  121.     video_mode_menu[count-1].val = -3;
  122.     video_mode_menu[count-1].data = NULL;
  123.     return 1;
  124. }
  125.  
  126. void vidmode_menu_selected(int m)
  127. {
  128.     int i;
  129.     struct ggi_graphmodes *dummy=got_modes.next;
  130.     for(i=1;i<=m;i++) dummy=dummy->next;
  131.     currprefs.gfx_width = dummy->x;
  132.     currprefs.gfx_height = dummy->y;
  133.     currprefs.color_mode = dummy->col == 32 ? 5 : dummy->col == 16 ? 2 : 0;
  134. }
  135.  
  136. static int colors_allocated;
  137. static ggi_color map[256];
  138. static ggi_color vga_map[256];
  139.  
  140. static void restore_vga_colors (void)
  141. {
  142.     int i;
  143.     if (gfxvidinfo.pixbytes != 1)
  144.     return;
  145.     memcpy (map, vga_map, sizeof map);
  146.     ggiSetPaletteVec(vis, 0, colors_allocated, map);
  147. }
  148.  
  149. static int get_color(int r, int g, int b, xcolnr *cnp)
  150. {
  151.     if(colors_allocated == 255) 
  152.     return -1;
  153.     *cnp = colors_allocated;
  154.     map[colors_allocated].r = doMask (r,16,0);
  155.     map[colors_allocated].g = doMask (g,16,0);
  156.     map[colors_allocated].b = doMask (b,16,0);
  157.  
  158.     colors_allocated++;
  159.     return 1;
  160. }
  161.  
  162. static void init_colors(void)
  163. {
  164.     if (need_dither) {
  165.     setup_dither (8, get_color);
  166.     } else {
  167.     int i;
  168.     colors_allocated = 0;
  169.     gfxvidinfo.can_double = 0;
  170.     switch (bpp){
  171.      case 8:
  172.         alloc_colors256 (get_color);
  173.         ggiSetPaletteVec (vis, 0, colors_allocated, map);
  174.         memcpy (vga_map, map, sizeof vga_map);
  175.         for (i = 0; i < 4096;i++)
  176.         xcolors[i] *= 0x01010101;
  177.         gfxvidinfo.can_double=1;
  178.         break;
  179.      case 16:
  180.         alloc_colors64k (5, 5, 5, 10, 5, 0);
  181.         for(i = 0; i < 4096; i++)
  182.         xcolors[i] *= 0x00010001;
  183.         gfxvidinfo.can_double=1;
  184.         break;
  185.      case 32:
  186.         alloc_colors64k(5, 5, 5, 10, 5, 0);
  187.         break;
  188.      default:
  189.         break;
  190.     }
  191.     }
  192. }
  193.  
  194. static int set_amiga_mode (void)
  195. {
  196.     int sx = gfxvidinfo.width;
  197.     int sy = gfxvidinfo.height;
  198.  
  199.     ggiSetFocus(vis);
  200.  
  201.     if (ggiSetGraphMode (vis, sx, sy, sx, sy, amiga_modetype) != 0) {
  202.     fprintf(stderr,"Can't set graphics mode\n");
  203.     return 0;
  204.     }
  205.     linear = ggiGetFB (vis);
  206.     return 1;
  207. }
  208.  
  209. int graphics_init (void) /* See how simple it is? :-> */
  210. {
  211.     int err,i;
  212.  
  213.     switch(currprefs.color_mode) {
  214.      case  0:
  215.     amiga_modetype = GT_8BIT;
  216.     need_dither = 0;
  217.     break;
  218.      case  1:
  219.      case  2:
  220.     amiga_modetype = GT_16BIT;
  221.     need_dither = 0;
  222.     break;
  223.      case  3:
  224.     amiga_modetype = GT_8BIT;
  225.     need_dither = 1;
  226.     break;
  227.      case  4:
  228.     amiga_modetype = GT_4BIT;
  229.     need_dither = 1;
  230.     break;
  231.      default:
  232.     fprintf(stderr, "Bad color mode selected. Using default.\n");
  233.     currprefs.color_mode = 0;
  234.     amiga_modetype = GT_8BIT;
  235.     break;
  236.     }
  237.  
  238.     gfxvidinfo.width = currprefs.gfx_width;
  239.     gfxvidinfo.height = currprefs.gfx_height;
  240.     
  241.     if (! set_amiga_mode ())
  242.     return 0;
  243.  
  244.     bpp = ggiGetBPP (vis);
  245.  
  246.     gfxvidinfo.pixbytes = bpp >> 3;
  247.     gfxvidinfo.rowbytes = gfxvidinfo.pixbytes * currprefs.gfx_width;
  248.     if (linear != NULL)
  249.     gfxvidinfo.bufmem = linear;
  250.     else
  251.     gfxvidinfo.bufmem = (char *)malloc (gfxvidinfo.rowbytes * currprefs.gfx_height);
  252.     gfxvidinfo.maxblocklines = 0;
  253.     memset (gfxvidinfo.bufmem, 0, gfxvidinfo.rowbytes * currprefs.gfx_height);
  254.     
  255.     screen_is_picasso = 0;
  256.     
  257.     for (i = 0; i < 256; i++) {
  258.        map[i].r=i;
  259.        map[i].g=i;
  260.        map[i].b=i;
  261.     }
  262.     ggiPackColors(vis, pack, map, 256);
  263.     init_colors ();
  264.  
  265.     buttonstate[0] = buttonstate[1] = buttonstate[2] = 0;
  266.     for (i = 0; i < 256; i++)
  267.     keystate[i] = 0;
  268.     lastmx = lastmy = 0;
  269.     return 1;
  270. }
  271.  
  272. void graphics_leave(void)
  273. {
  274.     ggiClose (vis);
  275.     ggiExit ();
  276. }
  277.  
  278. void flush_line(int y)
  279. {
  280.     int target_y = y;
  281.     int bit_unit=8;
  282.     int i=0;
  283.     char *addr;
  284.  
  285.     if (linear != NULL && !need_dither)
  286.     return;
  287.  
  288.     addr = gfxvidinfo.bufmem + y*gfxvidinfo.rowbytes;
  289.     if (target_y < 400 && target_y >= 0) {
  290.     if (need_dither) {
  291.         if (linear == NULL){
  292.         DitherLine (dither_buf, (uae_u16 *)addr, 0, y,
  293.                 gfxvidinfo.width, bit_unit);
  294.         addr = dither_buf;
  295.         ggiPutHLine (vis, 0, target_y, gfxvidinfo.width, addr);
  296.         } else {
  297.         DitherLine (linear + gfxvidinfo.rowbytes*y, (uae_u16 *)addr, 0, y,
  298.                 gfxvidinfo.width, bit_unit);
  299.         }
  300.         return;
  301.     }
  302.     if(linear==NULL)
  303.         ggiPutHLine(vis, 0, target_y, gfxvidinfo.width, addr);
  304.     }
  305. }
  306.  
  307. void flush_block(int a, int b){};
  308. void flush_screen(int a, int b){};
  309.  
  310. #define KEY_NOTHING 0x00
  311. #define AK_QUIT 0xf00
  312.  
  313. /* We should not need to have different versions for different keyboard */
  314. static short decodekey[128]={
  315.    KEY_NOTHING,    /* 0 */
  316.    AK_ESC,
  317.    AK_1, AK_2, AK_3, AK_4, AK_5, AK_6, AK_7, AK_8, AK_9, AK_0,
  318.    AK_MINUS,    /* 12 */
  319.    AK_EQUAL,
  320.    AK_BS,
  321.    AK_TAB,    /* 0x0f */
  322.    AK_Q, AK_W, AK_E, AK_R, AK_T,
  323.    AK_Y,    /* 0x15  Attention: language specific !!!! */
  324.    AK_U, AK_I, AK_O, AK_P, AK_LBRACKET,
  325.    AK_RBRACKET,    /* 0x1b */
  326.    AK_RET,
  327.    AK_CTRL,
  328.    AK_A, AK_S, AK_D, AK_F, AK_G, AK_H, AK_J, AK_K, AK_L,
  329.    AK_SEMICOLON,    /* 0x27 */
  330.    AK_QUOTE,    /* ä 0x28 */
  331.    KEY_NOTHING,
  332.    AK_LSH,    /* 0x2a */
  333.    AK_LTGT,    /* < 0x2b Attention: language specific !!!! */
  334.    AK_Z,    /* 0x2c Attention: language specific !!!! */
  335.    AK_X, AK_C, AK_V, AK_B, AK_N, AK_M, AK_COMMA, AK_PERIOD,
  336.    AK_SLASH,    /* 0x35 */
  337.    AK_RSH,    /* 0x36 */
  338.    AK_NPMUL,
  339.    AK_LALT,
  340.    AK_SPC,
  341.    AK_CAPSLOCK,    /* 0x3a */
  342.    AK_F1, AK_F2, AK_F3, AK_F4, AK_F5, AK_F6, AK_F7, AK_F8, AK_F9,
  343.    AK_F10,    /* 0x44 */
  344.    KEY_NOTHING,    /* NumLock */
  345.    KEY_NOTHING,    /* "Rollen" */
  346.    AK_NP7,    /* 0x47 */
  347.    AK_NP8,
  348.    AK_NP9,
  349.    AK_NPSUB,    /* 0x4a */
  350.    AK_NP4,
  351.    AK_NP5,
  352.    AK_NP6,
  353.    AK_NPADD,    /* 0x4e */
  354.    AK_NP1,
  355.    AK_NP2,
  356.    AK_NP3,
  357.    AK_NP0,    /* 0x52 */
  358.    AK_NPDEL,
  359.    KEY_NOTHING,    /* ??? */
  360.    KEY_NOTHING,    /* ??? */
  361.    KEY_NOTHING,    /* ??? */
  362.    AK_BS,    /* 0x57 --> F11 */
  363.    AK_QUIT,    /* 0x58 --> F12 */
  364.    KEY_NOTHING,    /* ??? */
  365.    KEY_NOTHING,    /* ??? */
  366.    KEY_NOTHING,    /* ??? */
  367.    KEY_NOTHING,    /* ??? */
  368.    KEY_NOTHING,    /* ??? */
  369.    KEY_NOTHING,    /* ??? */
  370.    KEY_NOTHING,    /* ??? */
  371.    AK_ENT,    /* 0x60 */
  372.    AK_RCTRL,    /* 0x61 */
  373.    AK_NPDIV,
  374.    KEY_NOTHING,
  375.    AK_RALT,    /* 0x64 */
  376.    KEY_NOTHING,    /* ??? */
  377.    AK_NP7,    /* Pos1 */
  378.    AK_UP,    /* 0x67 */
  379.    AK_LAMI,    /* 0x68  --> PgUp, */
  380.    AK_LF,    /* 0x69 */
  381.    AK_RT,    /* 0x6a */
  382.    AK_NP1,    /* End */
  383.    AK_DN,    /* 0x6c */
  384.    AK_RAMI,    /* --> PgDown */
  385.    AK_HELP,    /* 0x6e --> insert */
  386.    AK_DEL,
  387.    KEY_NOTHING,
  388.    KEY_NOTHING,
  389.    KEY_NOTHING,
  390.    KEY_NOTHING,
  391.    KEY_NOTHING,
  392.    KEY_NOTHING,
  393.    KEY_NOTHING,
  394.    KEY_NOTHING,    /* 0x77 --> Pause */
  395.    KEY_NOTHING,
  396.    KEY_NOTHING,
  397.    KEY_NOTHING,
  398.    KEY_NOTHING,
  399.    KEY_NOTHING,
  400.    AK_LAMI,    /* 0x7d    --> WindOoze left  */
  401.    AK_RAMI,    /*    --> WindOoze right */
  402.    AK_CTRL    /* 0x7f    --> WindOoze Menu  */
  403. };
  404.  
  405. void handle_events (void)
  406. {
  407.     struct timeval t={0,1};
  408.     ggi_event ev;
  409.     ggi_event_mask mask;
  410.     int akey;
  411.  
  412.     while (ggiEventPoll(vis,emPtrButton,&t)){
  413.     uint32 state=0, button=0;
  414.  
  415.     ggiEventRead (vis,&ev,emPtrButton);
  416.     state=ev.pbutton.state;
  417.     button=ev.pbutton.button;
  418.     switch (button) {
  419.      case 1: buttonstate[2]=state&button;break;
  420.      case 2: buttonstate[1]=(state&button)>>1;break;
  421.      case 4: buttonstate[0]=(state&button)>>2;break;
  422.      default: break;
  423.     }
  424.     }
  425.  
  426.     while (ggiEventPoll(vis,emPtrRelative,&t)) {
  427.     ggiEventRead (vis,&ev,emPtrRelative);
  428.     lastmx+=ev.pmove.x;
  429.     lastmy+=ev.pmove.y;
  430.     }
  431.     
  432.     while (ggiEventPoll (vis,emKey,&t)) {
  433.     ggiEventRead (vis,&ev,emKey);
  434.     if (ev.key.sym == 0)
  435.       continue;
  436.     if (ev.key.code > 128)
  437.       return;
  438.  
  439.     akey = decodekey[ev.key.code];
  440.  
  441.     if (akey == 0xf00)
  442.       uae_quit ();
  443.  
  444.     if (keystate[AK_CTRL] && keystate[AK_LAMI] && keystate[AK_RAMI])
  445.         m68k_reset ();
  446.  
  447.     switch (ev.key.type) {
  448.      case 6: /* Rel */
  449.         keystate[akey]=0;
  450.         record_key ((akey << 1) | 1);
  451.         break;
  452.      case 5: /* Press*/
  453.         if (akey == KEY_NOTHING)
  454.         break;
  455.         if (!keystate[akey]) {
  456.         keystate[akey]=1;
  457.         record_key(akey << 1);
  458.         }
  459.         break;
  460.      case 7: /*Repeat*/
  461.         break;
  462.      default:
  463.         break;
  464.     }
  465.     }
  466.  
  467. #ifdef PICASSO96
  468.     if (screen_is_picasso && !picasso_vidinfo.extra_mem) {
  469.     int i;
  470.     char *addr = gfxmemory + (picasso96_state.Address - gfxmem_start);
  471.     for (i = 0; i < picasso_vidinfo.height; i++, addr += picasso96_state.BytesPerRow) {
  472.         if (!picasso_invalid_lines[i])
  473.         continue;
  474.         picasso_invalid_lines[i] = 0;
  475.         ggiPutHLine (vis, 0, i, gfxvidinfo.width, addr);
  476.     }
  477.     }
  478. #endif
  479.  
  480.     return;
  481. }
  482.  
  483. void write_log(const char *buf)
  484. {
  485.     fprintf(stderr,buf);
  486. }
  487.  
  488. int debuggable(void)
  489. {
  490.     return 0;
  491. }
  492.  
  493. int needmousehack(void)
  494. {
  495.     return 0;
  496. }
  497.  
  498. /* This is not implemented yet as GGI is not that far */
  499. void LED(int on)
  500. {
  501. }
  502.  
  503. #ifdef PICASSO96
  504.  
  505. void DX_Invalidate (int first, int last)
  506. {
  507.     do {
  508.     picasso_invalid_lines[first] = 1;
  509.     first++;
  510.     } while (first <= last);
  511. }
  512.  
  513. int DX_BitsPerCannon (void)
  514. {
  515.     return 8;
  516. }
  517.  
  518. void DX_SetPalette(int start, int count)
  519. {
  520.     int i;
  521.  
  522.     if (!screen_is_picasso || picasso_vidinfo.pixbytes != 1)
  523.     return;
  524.  
  525.     fprintf (stderr, "DX_SetPalette\n");
  526.  
  527.     for (i = 0; i < count; i++) {
  528.     map[start + i].r = picasso96_state.CLUT[start + i].Red * 0x0101;
  529.     map[start + i].g = picasso96_state.CLUT[start + i].Green * 0x0101;
  530.     map[start + i].b = picasso96_state.CLUT[start + i].Blue * 0x0101;
  531.     }
  532.     ggiSetPaletteVec (vis, start, count, map + start);
  533. }
  534.  
  535. int DX_FillResolutions (uae_u16 *ppixel_format)
  536. {
  537.     int i, count = 0;
  538.     uae_u16 format = 0;
  539.  
  540.     for (i = 0; i < MAX_SCREEN_MODES; i++) {
  541.     if (ggiCheckGraphMode (vis, x_size_table[i], y_size_table[i],
  542.                    x_size_table[i], y_size_table[i],
  543.                    GT_8BIT) == 0) {
  544.         DisplayModes[count].res.width = x_size_table[i];
  545.         DisplayModes[count].res.height = y_size_table[i];
  546.         DisplayModes[count].depth = 1;
  547.         DisplayModes[count].refresh = 75;
  548.         count++;
  549.         format |= RGBFF_CHUNKY;
  550.     }
  551.     if (ggiCheckGraphMode (vis, x_size_table[i], y_size_table[i],
  552.                    x_size_table[i], y_size_table[i],
  553.                    GT_16BIT) == 0) {
  554.         DisplayModes[count].res.width = x_size_table[i];
  555.         DisplayModes[count].res.height = y_size_table[i];
  556.         DisplayModes[count].depth = 2;
  557.         DisplayModes[count].refresh = 75;
  558.         count++;
  559.         format |= RGBFF_R5G6B5PC;
  560.     }
  561.     if (ggiCheckGraphMode (vis, x_size_table[i], y_size_table[i],
  562.                    x_size_table[i], y_size_table[i],
  563.                    GT_32BIT) == 0) {
  564.         DisplayModes[count].res.width = x_size_table[i];
  565.         DisplayModes[count].res.height = y_size_table[i];
  566.         DisplayModes[count].depth = 4;
  567.         DisplayModes[count].refresh = 75;
  568.         count++;
  569.         format |= RGBFF_B8G8R8A8;
  570.     }
  571.     }
  572.  
  573.     *ppixel_format = format;
  574.     return count;
  575. }
  576.  
  577. static void set_window_for_picasso (void)
  578. {
  579.     int sx, sy;
  580.     sx = picasso_vidinfo.width;
  581.     sy = picasso_vidinfo.height;
  582.     fprintf (stderr, "picasso mode %d %d %d!\n", sx, sy, picasso_modetype);
  583.     if (ggiSetGraphMode (vis, sx, sy, sx, sy, picasso_modetype) != 0) {
  584.     fprintf (stderr,"Can't set graphics mode\n");
  585.     abort ();
  586.     }
  587.     fprintf (stderr, "picasso mode ok!\n");
  588.     linear = ggiGetFB(vis);
  589.     if (linear != NULL)
  590.     picasso_vidinfo.extra_mem = 1;
  591.     else
  592.     picasso_vidinfo.extra_mem = 0;
  593.     fprintf (stderr, "em: %d\n", picasso_vidinfo.extra_mem);
  594.     DX_SetPalette (0, 256);
  595. }
  596.  
  597. static void set_window_for_amiga (void)
  598. {
  599.     set_amiga_mode ();
  600.     if (linear != NULL && !need_dither)
  601.     gfxvidinfo.bufmem = linear;
  602.  
  603.     restore_vga_colors ();
  604. }
  605.  
  606. void gfx_set_picasso_modeinfo (int w, int h, int depth)
  607. {
  608.     fprintf (stderr, "set_picasso_modeinfo\n");
  609.     picasso_vidinfo.width = w;
  610.     picasso_vidinfo.height = h;
  611.     picasso_vidinfo.depth = depth;
  612.     picasso_vidinfo.pixbytes = depth >> 3;
  613.     picasso_vidinfo.rowbytes = w /* @@@ */;
  614.     picasso_modetype = (depth == 8 ? GT_8BIT
  615.             : depth == 16 ? GT_16BIT
  616.             : GT_32BIT);
  617.     if (screen_is_picasso)
  618.     set_window_for_picasso ();
  619. }
  620.  
  621. void gfx_set_picasso_baseaddr (uaecptr a)
  622. {
  623. }
  624.  
  625. void gfx_set_picasso_state (int on)
  626. {
  627.     if (on == screen_is_picasso)
  628.     return;
  629.     fprintf (stderr, "set_picasso_state\n");
  630.     screen_is_picasso = on;
  631.     if (on)
  632.     set_window_for_picasso ();
  633.     else
  634.     set_window_for_amiga ();
  635. }
  636.  
  637. uae_u8 *lockscr (void)
  638. {
  639.     return linear;
  640. }
  641. void unlockscr (void)
  642. {
  643. }
  644. #endif
  645.